<!-- Xử lý left menu -->
 <script type="text/javascript">
	$(document).ready(function(){
		$(".box_head").click(function(event){
		if($(this).next().is(":visible"))
		{
			$(this).children(':first-child').css("background","url(<?php echo $this->url->content("Content/gmode_newproduct/images/head_bg3_down.gif")?>) no-repeat right top");
			$(this).next().slideUp();
		}
		else
		{
			$(this).children(':first-child').css("background","url(<?php echo $this->url->content("Content/gmode_newproduct/images/head_bg3.gif")?>) no-repeat right top");
			$(this).next().slideDown();
		}
		});
		$("#advanced-button").click(function(event){
			if ($("#advanced-search").is(":visible"))
			{
				$("#advanced-search").slideUp();
				$("#search_in_description").val(0);
			}
			else
			{
				$("#advanced-search").slideDown();
				$("#search_in_description").val(1);
			}
		});
	});
</script>
        
            <!-- Box 3 -->
            <?php 
           //Hiển thị danh mục hàng hóa
           foreach ($this->arrCategories as $category)
           {
           		if ($category['parentID'] == 0)
           		{
           ?>
            <div class="left-box">
                <div class="box_head">
                    <div class="inner1">
                        <div class="inner2">
                            <div class="inner3">
                            	<h2><?php echo $category['name'];?></h2>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="box">
                    <div class="inner1">
                        <div class="box-indent">
                            <div class="box1_body">
                                <div id="bestsellersContent" class="sideBoxContent">
                                    <div class="wrapper">
                                        <ul>
                                        <?php foreach ($this->arrCategories as $subCategory)
                                        {
                                        	if ($subCategory['parentID'] == $category['id'])
                                        	{
                                        ?>
                                            <li class="category-top_un">
                                            	<span class="top-span">
                                            	<a href="<?php echo $this->url->action("index", "Products","","category/".$subCategory['id'])?>"><strong><?php echo $subCategory['name'];?></strong></a></span>
                                            </li>
										<?php }}?>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <?php }}?>
            <!-- Sản phẩm nổi bật -->
            <div class="left-box">
                <div class="box_head">
                    <div class="inner1">
                        <div class="inner2">
                            <div class="inner3">
                            	<h2>Sản phẩm nổi bật</h2>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="box">
                    <div class="inner1">
						<div id="imgAdv01" class="sideAdv sidePad" style="padding: 5px;">
							<script type="text/javascript">
								$(document).ready(function() {
									$('#slideshowAdv01').cycle({
										fx: 'scrollUp' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
									});
								});
							</script>
						    <div class="sidePadTop"></div>
						    <div class="sidePadMid" id="slideshowAdv01">
						    <?php foreach ($this->highlight as $hl)
						    {
						    ?>
						        <a href="<?php echo $this->url->action("detail","Products", array($hl['id']))?>">
						        	<img src="<?php echo $hl['image']?>" height="200" width="190" alt="" /></a>
						    <?php 
						    }
						    ?>
						    </div>
						    <div class="sidePadBot">
						    </div>
						</div> 
                    </div>
                </div>
            </div>